<?php
include "xp_project_function.php";

if(true){
    $delete_files = [
        'application\admin\controller\csmitsm\Clogininfo.php',
        'application\admin\controller\csmitsm\Cloginlog.php',
        'application\admin\controller\csmitsm\Cloginmessage.php',
        'application\admin\controller\csmitsm\Cloginthird.php',
        'application\admin\controller\csmitsm\Cloginwxscan.php',
        'application\admin\controller\csmitsm\Commoninterfacelog.php',
        'application\admin\controller\csmitsm\Commonsqllog.php',
        'application\admin\controller\csmitsm\Dmo.php',
        'application\admin\controller\csmitsm\Dmo2category.php',
        'application\admin\controller\csmitsm\Dmoapply.php',
        'application\admin\controller\csmitsm\Dmocategory.php',
        'application\admin\controller\csmitsm\Dmoitem.php',
        'application\admin\controller\csmitsm\Xcflowfield.php',
        'application\admin\controller\csmitsm\XcflowformAutono.php',
        'application\admin\controller\csmitsm\XcflowInstance.php',
        'application\admin\controller\csmitsm\Xcflowjson.php',
        'application\admin\controller\csmitsm\XpDmoDashboard.php',
        'application\admin\controller\csmitsm\XcflowInstancetrace.php',
        'application\admin\controller\csmitsm\Xcflowmdmfield.php',

        'application\admin\validate\csmitsm\Clogininfo.php',
        'application\admin\validate\csmitsm\Cloginlog.php',
        'application\admin\validate\csmitsm\Cloginmessage.php',
        'application\admin\validate\csmitsm\Cloginthird.php',
        'application\admin\validate\csmitsm\Cloginwxscan.php',
        'application\admin\validate\csmitsm\Commoninterfacelog.php',
        'application\admin\validate\csmitsm\Commonsqllog.php',
        'application\admin\validate\csmitsm\Dmo.php',
        'application\admin\validate\csmitsm\Dmo2category.php',
        'application\admin\validate\csmitsm\Dmoapply.php',
        'application\admin\validate\csmitsm\Dmocategory.php',
        'application\admin\validate\csmitsm\Dmoitem.php',
        'application\admin\validate\csmitsm\Xcflowfield.php',
        'application\admin\validate\csmitsm\XcflowformAutono.php',
        'application\admin\validate\csmitsm\XcflowInstance.php',
        'application\admin\validate\csmitsm\Xcflowjson.php',
        'application\admin\validate\csmitsm\XpDmoDashboard.php',
        'application\admin\validate\csmitsm\XcflowInstancetrace.php',
        'application\admin\validate\csmitsm\Xcflowmdmfield.php',

        'public\assets\js\backend\csmitsm\Clogininfo.js',
        'public\assets\js\backend\csmitsm\Cloginlog.js',
        'public\assets\js\backend\csmitsm\Cloginmessage.js',
        'public\assets\js\backend\csmitsm\Cloginthird.js',
        'public\assets\js\backend\csmitsm\Cloginwxscan.js',
        'public\assets\js\backend\csmitsm\Commoninterfacelog.js',
        'public\assets\js\backend\csmitsm\Commonsqllog.js',
        'public\assets\js\backend\csmitsm\Dmo.js',
        'public\assets\js\backend\csmitsm\Dmo2category.js',
        'public\assets\js\backend\csmitsm\Dmoapply.js',
        'public\assets\js\backend\csmitsm\Dmocategory.js',
        'public\assets\js\backend\csmitsm\Dmoitem.js',
        'public\assets\js\backend\csmitsm\Xcflowfield.js',
        'public\assets\js\backend\csmitsm\XcflowformAutono.js',
        'public\assets\js\backend\csmitsm\XcflowInstance.js',
        'public\assets\js\backend\csmitsm\Xcflowjson.js',
        'public\assets\js\backend\csmitsm\XpDmoDashboard.js',
        'public\assets\js\backend\csmitsm\XcflowInstancetrace.js',
        'public\assets\js\backend\csmitsm\Xcflowmdmfield.js',

        'application\admin\model\csmitsm\Clogininfo.php',
        'application\admin\model\csmitsm\Cloginlog.php',
        'application\admin\model\csmitsm\Cloginmessage.php',
        'application\admin\model\csmitsm\Cloginthird.php',
        'application\admin\model\csmitsm\Cloginwxscan.php',
        'application\admin\model\csmitsm\Commoninterfacelog.php',
        'application\admin\model\csmitsm\Commonsqllog.php',
        'application\admin\model\csmitsm\Dmo.php',
        'application\admin\model\csmitsm\Dmo2category.php',
        'application\admin\model\csmitsm\Dmoapply.php',
        'application\admin\model\csmitsm\Dmocategory.php',
        'application\admin\model\csmitsm\Dmoitem.php',
        'application\admin\model\csmitsm\XpDmoDashboard.php',

        'application\admin\lang\zh-cn\csmitsm\clogininfo.php',
        'application\admin\lang\zh-cn\csmitsm\Cloginlog.php',
        'application\admin\lang\zh-cn\csmitsm\Cloginmessage.php',
        'application\admin\lang\zh-cn\csmitsm\Cloginthird.php',
        'application\admin\lang\zh-cn\csmitsm\Cloginwxscan.php',
        'application\admin\lang\zh-cn\csmitsm\Commoninterfacelog.php',
        'application\admin\lang\zh-cn\csmitsm\Commonsqllog.php',
        'application\admin\lang\zh-cn\csmitsm\Dmo.php',
        'application\admin\lang\zh-cn\csmitsm\Dmo2category.php',
        'application\admin\lang\zh-cn\csmitsm\Dmoapply.php',
        'application\admin\lang\zh-cn\csmitsm\Dmocategory.php',
        'application\admin\lang\zh-cn\csmitsm\Dmoitem.php',
        'application\admin\lang\zh-cn\csmitsm\XpDmoDashboard.php',

    ];
    foreach ($delete_files as $item) {
        if (file_exists($item)) {
            echo "deleteFile {$item}\r\n";
            unlink($item);
        }
    }
}
if(true){
    $delete_directorys = [
        'addons\csmitsm\library\composer',
        'addons\csmitsm\uniapp\csmitsm_mobile',

        'application\admin\view\csmitsm\Clogininfo',
        'application\admin\view\csmitsm\Cloginlog',
        'application\admin\view\csmitsm\Cloginmessage',
        'application\admin\view\csmitsm\Cloginthird',
        'application\admin\view\csmitsm\Cloginwxscan',
        'application\admin\view\csmitsm\Commoninterfacelog',
        'application\admin\view\csmitsm\Commonsqllog',
        'application\admin\view\csmitsm\Dmo',
        'application\admin\view\csmitsm\Dmo2category',
        'application\admin\view\csmitsm\Dmoapply',
        'application\admin\view\csmitsm\Dmocategory',
        'application\admin\view\csmitsm\Dmoitem',
        'application\admin\view\csmitsm\Xcflowfield',
        'application\admin\view\csmitsm\XcflowformAutono',
        'application\admin\view\csmitsm\XcflowInstance',
        'application\admin\view\csmitsm\Xcflowjson',
        'application\admin\view\csmitsm\xp_dmo_dashboard',
        'application\admin\view\csmitsm\XcflowInstancetrace',
    ];
    foreach ($delete_directorys as $item) {
        if (file_exists($item)) {
            deleteDirectory($item);
        }
    }
}